
#ifndef  RECOVERY_ITOPIC_H
#define  RECOVERY_ITOPIC_H

#include <string>
#include <functional>
#include "recovery/Common.h"

namespace recovery {

template<typename T>
class ITopic : public IResource {
public:
	virtual ~ITopic(){}

    virtual T & set(const std::string & key, const std::string & value)  = 0;
    virtual T & begin() = 0;
    virtual T & commit() = 0;
    virtual T & rollback() = 0;
	virtual int visit(const std::function<int (const std::string & , const std::string &)> & fn) = 0;
};

}// end of namespace recovery

#endif   /* RECOVERY_ITOPIC_H */
